翻訳と辞書
Words near each other
・ Methodist Episcopal Church (Orleans, New York)
・ Methodist Episcopal Church (Ottawa, Minnesota)
・ Methodist Episcopal Church (Pierre, South Dakota)
・ Methodist Episcopal Church (Scotland, South Dakota)
・ Methodist Episcopal Church (Stannard, Vermont)
・ Methodist Episcopal Church (Stony Creek, New York)
・ Methodist Episcopal Church (Swanton, Vermont)
・ Methodist Episcopal Church (Yuma, Arizona)
・ Methodist Episcopal Church at Half Moon Bay
・ Methodist Episcopal Church of Burlington
・ Methodist Episcopal Church of Butler
・ Methodist Episcopal Church of Goshen
・ Methoctramine
・ Method
・ Method & Red
Method (computer programming)
・ Method (Experience Design Firm)
・ Method (film)
・ Method (Godhead)
・ Method (music)
・ Method (patent)
・ Method acting
・ Method Actor
・ Method Animation
・ Method cascading
・ Method chaining
・ Method engineering
・ Method Fest Independent Film Festival
・ Method Framework for Engineering System Architectures
・ Method grab


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Method (computer programming) : ウィキペディア英語版
Method (computer programming)
A method (or message) in object-oriented programming (OOP) is a procedure associated with an object class. An object is made up of behavior and data. Data is represented as properties of the object and behavior as methods. Methods are also the interface an object presents to the outside world. For example a window object would have methods such as open and close. One of the most important capabilities that a method provides is method overriding. The same name (e.g., area) can be used for multiple different kinds of classes. This allows the sending objects to invoke behaviors and to delegate the implementation of those behaviors to the receiving object. For example an object can send an area message to another object and the appropriate formula will be invoked whether the receiving object is a rectangle,circle, triangle, etc.
Methods also provide the interface that other classes use to access and modify the data properties of an object. This is known as encapsulation. Encapsulation and overriding are the two primary distinguishing features between methods and procedure calls.
==Overriding and overloading==
Method overriding and overloading are two of the most significant ways that a method differs from a conventional procedure or function call. Overriding refers to a subclass redefining the implementation of a method of its superclass. For example findArea may be a method defined on a shape class. The various subclasses: rectangle, circle, triangle, etc. would each define the appropriate formula to calculate their area. The idea is to look at objects as "black boxes" so that changes to the internals of the object can be made with minimal impact on the other objects that use it. This is known as encapsulation and is meant to make code easier to maintain and re-use.
Method overloading on the other hand refers to differentiating the code used to handle a message based on the parameters of the method. If one views the receiving object as the first parameter in any method then overriding is just a special case of overloading where the selection is based only on the first argument.〔(http://www.codeproject.com/Articles/16407/METHOD-Overload-Vs-Overriding )〕 The following simple Java example illustrates the difference:〔


public class class1
public class class2 extends class1
}


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Method (computer programming)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.